﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class CusReqCalculatorController
    {
       public int InsertCusReqCalculator(CusReqCalculatorInfo info)
        {
            return SQL.InsertCusReqCalculator(info.CusReqCalItemId, info.CusReqCalItemTybe, info.CusReqCalQuantityDay, info.CusReqCalQuantityAdults, info.CusReqCalQuantityChild, info.CusReqCalQuantityBaby, info.CusReqCalDateBegin, info.CusReqCalDateEnd, info.CusReqCalBeginLocation, info.CusReqCalEndLocation, info.CusReqCalOtherRequest, info.CusReqCalStatus, info.CusReqCalCreatedBy, info.CusReqCalUpDatedBy, info.CusReqCalCreatedDate, info.CusReqCalUpDatedDate);
        }
        public void UpdateCusReqCalculator(CusReqCalculatorInfo info)
        {
            SQL.UpdateCusReqCalculator(info.CusReqCalItemId, info.CusReqCalItemTybe, info.CusReqCalQuantityDay, info.CusReqCalQuantityAdults, info.CusReqCalQuantityChild, info.CusReqCalQuantityBaby, info.CusReqCalDateBegin, info.CusReqCalDateEnd, info.CusReqCalBeginLocation, info.CusReqCalEndLocation, info.CusReqCalOtherRequest, info.CusReqCalStatus, info.CusReqCalCreatedBy, info.CusReqCalUpDatedBy, info.CusReqCalCreatedDate, info.CusReqCalUpDatedDate, info.CusReqCalId);
        }
        public void DeleteCusReqCalculator(CusReqCalculatorInfo info)
        {
            DeleteCusReqCalculator(info.CusReqCalId);
        }
        public void DeleteCusReqCalculator(int cusReqCalId)
        {
            SQL.DeleteCusReqCalculator(cusReqCalId);
        }
        public CusReqCalculatorInfo GetCusReqCalculator(int cusReqCalId)
        {
            return CBO.FillObject<CusReqCalculatorInfo>(SQL.GetCusReqCalculator(cusReqCalId));
        }
        public List<CusReqCalculatorInfo> ListCusReqCalculator()
        {
            return CBO.FillCollection<CusReqCalculatorInfo>(SQL.ListCusReqCalculator());
        }
        public DataTable SelectCusReqCalculator()
        {
            return CBO.ConvertToDataTable(ListCusReqCalculator(), typeof(CusReqCalculatorInfo));
        }
    }
}
